//
//  HNSH_MineViewOtherHeader.m
//  HNSH_SingleProject
//
//  Created by 李宇廷 on 2023/2/28.
//

#import "HNSH_MineViewOtherHeader.h"


#import "HNSH_MineTopItemView.h"
#import "HNSH_MineBottomItemView.h"
#import "HNSH_VideoTaskAlert.h"
//#import "HNSH_RewardToors.h"

#import "HNSH_IntegralBillManager.h"
#import "HNSH_AccountEditViewController.h"


#import "HNSH_TaskCenterManage.h"                       //任务中心
#import "HNSH_MyTeamViewController.h"                   //我的团队
#import "HNSH_AgentViewController.h"                    //我的代理
#import "HNSH_XJDRViewController.h"                     //星级达人
#import "HNSH_AccountViewController.h"

@interface HNSH_MineViewOtherHeader ()

/* headerImgV */
@property (nonatomic, strong) UIImageView *headerImgV;
/* nameLabel */
@property (nonatomic, strong) UILabel *nameLabel;
/* 实名状态 */
@property (nonatomic, strong) UILabel *realNameStatusLabel;
/* 邀请码 */
@property (nonatomic, strong) UILabel *yqmLabel;
/* copyButton */
@property (nonatomic, strong) UIButton *cyButton;
/* hiddenButton */
@property (nonatomic, strong) UIButton *hiddenButton;

/* setButton */
@property (nonatomic, strong) UIButton *setButton;

/* 合伙人 */
@property (nonatomic, strong) UIButton *partnerButton;

/* 绿色能量 */
@property (nonatomic, strong) HNSH_MineTopItemView *lsItemView;
/* 购物值 */
@property (nonatomic, strong) HNSH_MineTopItemView *gwItemView;
/* 贡献值 */
@property (nonatomic, strong) HNSH_MineTopItemView *gxbItemView;
/* 活跃值 */
@property (nonatomic, strong) HNSH_MineTopItemView *hyzItemView;

/* taskButton */
//@property (nonatomic, strong) UIButton *taskButton;
/* videoButton */
@property (nonatomic, strong) UIButton *videoButton;
/* videoAdCountLabel */
@property (nonatomic, strong) UILabel *videoAdCountLabel;
/* videoAdCountLabel */
@property (nonatomic, strong) UILabel *videoAdLabel;

/* 区域代理 */
@property (nonatomic, strong) HNSH_MineBottomItemView *dlItemView;
/* 我的团队 */
@property (nonatomic, strong) HNSH_MineBottomItemView *teamItemView;
/* 星级达人 */
@property (nonatomic, strong) HNSH_MineBottomItemView *drItemView;

/* adItem */
@property (nonatomic, strong) ST_UserAdvertListItem *adItem;

@end

@implementation HNSH_MineViewOtherHeader

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        [self configUI];
    }
    return self;
}

- (void)setUserInfo:(ST_UserInfo *)userInfo {
    if (userInfo) {
        _userInfo = userInfo;
        [self.headerImgV sd_setImageWithURL:[NSURL URLWithString:userInfo.avatar_url] placeholderImage:[UIImage imageNamed:@"base_user_header_icon"]];
        self.nameLabel.text = userInfo.nickname;
        self.yqmLabel.text = [NSString stringWithFormat:@"邀请码：%@",userInfo.invite_code];
        self.realNameStatusLabel.hidden = self.yqmLabel.hidden = self.cyButton.hidden = NO;
        self.realNameStatusLabel.text = [NSString stringWithFormat:@"  %@  ",userInfo.certify_status == 1 ? @"已认证" : @"未认证"];
        self.realNameStatusLabel.backgroundColor = userInfo.certify_status == 1 ? [UIColor appGreenColor] : [UIColor appGrayLabelColor];
        self.lsItemView.desLabel.text = [NSString stringWithFormat:@"%.2f",[userInfo.integral doubleValue]];
        self.gwItemView.desLabel.text = [NSString stringWithFormat:@"%.2f",[userInfo.shopping_value doubleValue]];
        self.gxbItemView.desLabel.text = [NSString stringWithFormat:@"%.2f",[userInfo.contribution_value doubleValue]];
        self.hyzItemView.desLabel.text = [NSString stringWithFormat:@"%.2f",[userInfo.active_value doubleValue]];
    } else {
        self.headerImgV.image = [UIImage imageNamed:@"base_user_header_icon"];
        self.nameLabel.text = @"请登录";
        self.realNameStatusLabel.hidden = self.yqmLabel.hidden = self.cyButton.hidden = YES;
        self.lsItemView.desLabel.text = @"0.00";
        self.gwItemView.desLabel.text = @"0.00";
        self.gxbItemView.desLabel.text = @"0.00";
        self.hyzItemView.desLabel.text = @"0.00";
    }
}

- (void)configUI {
    [self addSubview:self.headerImgV];
    [self addSubview:self.nameLabel];
    [self addSubview:self.setButton];
    
    [self.headerImgV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(16);
        make.top.mas_equalTo(24+kStatusBarHeight);
        make.width.height.mas_equalTo(60);
    }];
    
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.headerImgV.mas_right).offset(16);
        make.top.equalTo(self.headerImgV.mas_top).offset(7);
        make.height.mas_equalTo(25);
    }];
    
    if ([[NSUserDefaults standardUserDefaults] boolForKey:KUserShowHiddenContentID]) {
        [self addSubview:self.realNameStatusLabel];
        [self addSubview:self.yqmLabel];
        [self addSubview:self.cyButton];
        [self addSubview:self.hiddenButton];
        [self addSubview:self.partnerButton];
        
        [self addSubview:self.lsItemView];
        [self addSubview:self.gwItemView];
        [self addSubview:self.gxbItemView];
        [self addSubview:self.hyzItemView];
        
//        [self addSubview:self.taskButton];
        [self addSubview:self.videoButton];
        [self.videoButton addSubview:self.videoAdCountLabel];
        [self.videoButton addSubview:self.videoAdLabel];
        
//        [self addSubview:self.dlItemView];
//        [self addSubview:self.teamItemView];
//        [self addSubview:self.drItemView];
        
        [self loadSignAdvertProgressInfo];
        
        [self.realNameStatusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.nameLabel.mas_right).offset(8);
            make.centerY.equalTo(self.nameLabel.mas_centerY);
            make.height.mas_equalTo(16);
        }];
        
        [self.partnerButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.nameLabel.mas_right).offset(8);
            make.top.equalTo(self.nameLabel.mas_top).offset(4);
            make.height.mas_equalTo(16);
            make.width.mas_equalTo(45);
        }];
        
        [self.yqmLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.headerImgV.mas_right).offset(16);
            make.top.equalTo(self.nameLabel.mas_bottom).offset(4);
            make.height.mas_equalTo(17);
        }];
        
        [self.cyButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.yqmLabel.mas_right).offset(10);
            make.centerY.equalTo(self.yqmLabel.mas_centerY);
            make.width.mas_equalTo(28);
            make.height.mas_equalTo(12);
        }];
        
        [self.hiddenButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.cyButton.mas_right).offset(10);
            make.centerY.equalTo(self.cyButton.mas_centerY);
            make.width.mas_equalTo(28);
            make.height.mas_equalTo(12);
        }];
    }
}

//广告点击
- (void)loadSignAdvertProgressWithKey:(NSString *)key {
    NSDictionary * params = @{@"key":key,@"event_id":[NSString getNowTimeTimestamp]};
    [HNSH_UserNetServer requestMineAdvertProgressWithParams:params success:^(ST_BaseNetModel * _Nullable responseObject) {
        if (responseObject.code == 0) {
            //广告点击查询
            [self loadSignAdvertProgressInfo];
            
            WeakSelf(weakSelf);
            //完成任务
            HNSH_VideoTaskAlert *alert = [[HNSH_VideoTaskAlert alloc]initWithFrame:CGRectMake(0, 0, 287, 306)];
            alert.titleString = [NSString stringWithFormat:@"%@",responseObject.resultset[@"title"]];
            alert.desString = [NSString stringWithFormat:@"%@",responseObject.resultset[@"tip_text"]];
            [alert showView];
            alert.videoBlock = ^{
                [weakSelf showADVideo];
            };
        }
    } Failure:^(NSError * _Nullable error) {
        
    }];
}

//广告点击查询
- (void)loadSignAdvertProgressInfo {
    [HNSH_UserNetServer requestMineAdvertProgressWithParams:@{} success:^(ST_BaseNetModel * _Nullable responseObject) {
        if (responseObject.code == 0) {
            NSArray *ary = responseObject.resultset;
            if (ary.count > 0) {
                self.adItem = [ST_UserAdvertListItem yy_modelWithDictionary:responseObject.resultset[0]];
                self.videoAdCountLabel.text = [NSString stringWithFormat:@"%ld/%ld",self.adItem.complete_count,self.adItem.daily_count];
            }
        }
    } Failure:^(NSError * _Nullable error) {
        
    }];

}

- (void)showADVideo {
    if (self.adItem.complete_count < self.adItem.daily_count) {
        WeakSelf(weakSelf);
        //激励视频
//        [[HNSH_RewardToors share] showADWithController:[UIViewControllerHelper findCurrentShowingViewController] complate:^(BOOL success) {
//            if (!success) {
//                [weakSelf loadSignAdvertProgressWithKey:weakSelf.adItem.key];
//            }
//        }];
    } else {
        [kSTWindow makeToast:@"广告次数已用完"];
    }
}

#pragma mark lazy
- (UIImageView *)headerImgV {
    if (!_headerImgV) {
        _headerImgV = [[UIImageView alloc]init];
        _headerImgV.contentMode = UIViewContentModeScaleAspectFill;
        _headerImgV.layer.cornerRadius = 10;
        _headerImgV.layer.masksToBounds = YES;
        _headerImgV.userInteractionEnabled = YES;
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithActionBlock:^(id  _Nonnull sender) {
            if (![ST_UserManager alreadyLogin]) {
                [ST_UserManager gotoLogin];
                return;
            }
            HNSH_AccountEditViewController *vc = [[HNSH_AccountEditViewController alloc]init];
            [[UIViewControllerHelper findCurrentShowingViewController].navigationController pushViewController:vc animated:YES];
        }];
        [_headerImgV addGestureRecognizer:tap];
    }
    return _headerImgV;
}

- (UILabel *)nameLabel {
    if (!_nameLabel) {
        _nameLabel = [[UILabel alloc]init];
        _nameLabel.text = @"";
        _nameLabel.textColor = [UIColor appBlackLabelColor];
        _nameLabel.font = [UIFont boldSystemFontOfSize:18];
        _nameLabel.userInteractionEnabled = YES;
        WeakSelf(weakSelf);
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithActionBlock:^(id  _Nonnull sender) {
            if (weakSelf.headerClick) {
                weakSelf.headerClick();
            }
        }];
        [_nameLabel addGestureRecognizer:tap];
    }
    return _nameLabel;
}

- (UILabel *)yqmLabel {
    if (!_yqmLabel) {
        _yqmLabel = [[UILabel alloc]init];
        _yqmLabel.text = @"";
        _yqmLabel.textColor = [UIColor appGray666LabelColor];
        _yqmLabel.font = [UIFont systemFontOfSize:12];
    }
    return _yqmLabel;
}

- (UILabel *)realNameStatusLabel {
    if (!_realNameStatusLabel) {
        _realNameStatusLabel = [[UILabel alloc]init];
        _realNameStatusLabel.text = @"";
        _realNameStatusLabel.textColor = [UIColor appWhiteLabelColor];
        _realNameStatusLabel.backgroundColor = [UIColor appGrayLabelColor];
        _realNameStatusLabel.font = [UIFont systemFontOfSize:11];
        _realNameStatusLabel.layer.cornerRadius = 8;
        _realNameStatusLabel.layer.masksToBounds = YES;
    }
    return _realNameStatusLabel;
}

- (UIButton *)partnerButton {
    if (!_partnerButton) {
        _partnerButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_partnerButton setTitle:@"合伙人" forState:UIControlStateNormal];
        [_partnerButton setTitleColor:[UIColor appWhiteLabelColor] forState:UIControlStateNormal];
        _partnerButton.titleLabel.font = [UIFont boldSystemFontOfSize:15];
        _partnerButton.backgroundColor = [UIColor appGreenColor];
        _partnerButton.layer.cornerRadius = 8.0f;
        _partnerButton.layer.masksToBounds = YES;
        _partnerButton.hidden = YES;
        [[_partnerButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
//            HNSH_PartnerViewController *vc = [[HNSH_PartnerViewController alloc]init];
//            [[UIViewControllerHelper findCurrentShowingViewController].navigationController pushViewController:vc animated:YES];
        }];
    }
    return _partnerButton;
}

- (UIButton *)cyButton {
    if (!_cyButton) {
        _cyButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_cyButton setTitle:@"复制" forState:UIControlStateNormal];
        [_cyButton setTitleColor:[UIColor appGrayLabelColor] forState:UIControlStateNormal];
        _cyButton.titleLabel.font = [UIFont boldSystemFontOfSize:12];
        [[_cyButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
            if ([ST_UserManager shareInstance].user && [[ST_UserManager shareInstance].user.invite_code isNotBlank]) {
                [NSString copyToShearPlateString:[ST_UserManager shareInstance].user.invite_code];
                [kSTWindow makeToast:@"复制成功"];
            }
        }];
    }
    return _cyButton;
}

- (UIButton *)hiddenButton {
    if (!_hiddenButton) {
        _hiddenButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_hiddenButton setTitle:@"隐藏" forState:UIControlStateNormal];
        [_hiddenButton setTitleColor:[UIColor appGrayLabelColor] forState:UIControlStateNormal];
        _hiddenButton.titleLabel.font = [UIFont boldSystemFontOfSize:12];
        WeakSelf(weakSelf);
        [[_hiddenButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
            if ([ST_UserManager shareInstance].user && [[ST_UserManager shareInstance].user.invite_code isNotBlank]) {
                UIButton *button = x;
                button.selected = !button.selected;
                [button setTitle:button.isSelected ? @"显示" : @"隐藏" forState:UIControlStateNormal];
                weakSelf.yqmLabel.text = [NSString stringWithFormat:@"邀请码：%@",button.isSelected ? @"******" : weakSelf.userInfo.invite_code];
            }
        }];
    }
    return _hiddenButton;
}

- (UIButton *)setButton {
    if (!_setButton) {
        _setButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _setButton.frame = CGRectMake(kScreenWidth-40, kStatusBarHeight+4, 24, 24);
        [_setButton setBackgroundImage:[UIImage imageNamed:@"mine_top_set_icon"] forState:UIControlStateNormal];
        [[_setButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
            HNSH_AccountViewController *vc = [[HNSH_AccountViewController alloc]init];
            [[UIViewControllerHelper findCurrentShowingViewController].navigationController pushViewController:vc animated:YES];
        }];
    }
    return _setButton;
}

- (HNSH_MineTopItemView *)lsItemView {
    if (!_lsItemView) {
        _lsItemView = [[HNSH_MineTopItemView alloc]initWithFrame:CGRectMake(0, kStatusBarHeight+108, kScreenWidth/4, 41)];
        _lsItemView.titleLabel.text = @"绿色能量";
        _lsItemView.desLabel.text = @"0.00";
        _lsItemView.clickBlock = ^{
            HNSH_IntegralBillManager *vc = [[HNSH_IntegralBillManager alloc]init];
            vc.zjType = 1;
            [[UIViewControllerHelper findCurrentShowingViewController].navigationController pushViewController:vc animated:YES];
        };
    }
    return _lsItemView;
}

- (HNSH_MineTopItemView *)gwItemView {
    if (!_gwItemView) {
        _gwItemView = [[HNSH_MineTopItemView alloc]initWithFrame:CGRectMake(kScreenWidth/4, kStatusBarHeight+108, kScreenWidth/4, 41)];
        _gwItemView.titleLabel.text = @"购物值";
        _gwItemView.desLabel.text = @"0.00";
        _gwItemView.clickBlock = ^{
            HNSH_IntegralBillManager *vc = [[HNSH_IntegralBillManager alloc]init];
            vc.zjType = 7;
            [[UIViewControllerHelper findCurrentShowingViewController].navigationController pushViewController:vc animated:YES];
        };
    }
    return _gwItemView;
}

- (HNSH_MineTopItemView *)gxbItemView {
    if (!_gxbItemView) {
        _gxbItemView = [[HNSH_MineTopItemView alloc]initWithFrame:CGRectMake(kScreenWidth/4*2, kStatusBarHeight+108, kScreenWidth/4, 41)];
        _gxbItemView.titleLabel.text = @"贡献值";
        _gxbItemView.desLabel.text = @"0.00";
        _gxbItemView.clickBlock = ^{
            HNSH_IntegralBillManager *vc = [[HNSH_IntegralBillManager alloc]init];
            vc.zjType = 6;
            [[UIViewControllerHelper findCurrentShowingViewController].navigationController pushViewController:vc animated:YES];
        };
    }
    return _gxbItemView;
}

- (HNSH_MineTopItemView *)hyzItemView {
    if (!_hyzItemView) {
        _hyzItemView = [[HNSH_MineTopItemView alloc]initWithFrame:CGRectMake(kScreenWidth/4*3, kStatusBarHeight+108, kScreenWidth/4, 41)];
        _hyzItemView.titleLabel.text = @"活跃值";
        _hyzItemView.desLabel.text = @"0.00";
        _hyzItemView.clickBlock = ^{
            HNSH_IntegralBillManager *vc = [[HNSH_IntegralBillManager alloc]init];
            vc.zjType = 4;
            [[UIViewControllerHelper findCurrentShowingViewController].navigationController pushViewController:vc animated:YES];
        };
    }
    return _hyzItemView;
}

//- (UIButton *)taskButton {
//    if (!_taskButton) {
//        _taskButton = [UIButton buttonWithType:UIButtonTypeCustom];
//        _taskButton.frame = CGRectMake(12, kStatusBarHeight+165, kScreenWidth-24, 44);
//        [_taskButton setBackgroundImage:[UIImage imageNamed:@"mine_task_icon"] forState:UIControlStateNormal];
//        [[_taskButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
//            HNSH_TaskCenterManage *vc = [[HNSH_TaskCenterManage alloc]init];
//            [[UIViewControllerHelper findCurrentShowingViewController].navigationController pushViewController:vc animated:YES];
//        }];
//    }
//    return _taskButton;
//}

- (UIButton *)videoButton {
    if (!_videoButton) {
        _videoButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _videoButton.frame = CGRectMake(20, kStatusBarHeight+177, kScreenWidth-40, 50);
        [_videoButton setBackgroundImage:[UIImage imageNamed:@"mine_video_icon"] forState:UIControlStateNormal];
        WeakSelf(weakSelf);
        [[_videoButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
            [weakSelf showADVideo];
        }];
    }
    return _videoButton;
}

- (UILabel *)videoAdCountLabel {
    if (!_videoAdCountLabel) {
        _videoAdCountLabel = [[UILabel alloc]initWithFrame:CGRectMake(12, 0, 250, self.videoButton.height)];
        _videoAdCountLabel.text = @"每日观看视频｜领取惠果（0/5）";
        _videoAdCountLabel.textColor = [UIColor appWhiteLabelColor];
        _videoAdCountLabel.font = [UIFont systemFontOfSize:15];
        _videoAdCountLabel.textAlignment = NSTextAlignmentRight;
        _videoAdCountLabel.userInteractionEnabled = NO;
    }
    return _videoAdCountLabel;
}

- (UILabel *)videoAdLabel{
    if (!_videoAdLabel) {
        _videoAdLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.videoButton.width-64-15, 11, 64, 28)];
        _videoAdLabel.textColor = [UIColor appWhiteLabelColor];
        _videoAdLabel.font = [UIFont systemFontOfSize:14];
        _videoAdLabel.text = @"去观看";
        _videoAdLabel.textAlignment = NSTextAlignmentCenter;
        _videoAdLabel.backgroundColor = [UIColor due_colorGradientChangeWithSize:CGSizeMake(56, 30) direction:DUEGradientChangeDirectionLevel startColor:[UIColor colorWithHexString:@"#3EA700"] endColor:[UIColor colorWithHexString:@"#6AD335"]];;
        _videoAdLabel.layer.cornerRadius = 14.0f;
        _videoAdLabel.layer.masksToBounds = YES;
    }
    return _videoAdLabel;
}

- (HNSH_MineBottomItemView *)dlItemView {
    if (!_dlItemView) {
        _dlItemView = [[HNSH_MineBottomItemView alloc]initWithFrame:CGRectMake(12, 277+kStatusBarHeight, (kScreenWidth-44)/3, 88)];
        _dlItemView.iconImgV.image = [UIImage imageNamed:@"mine_function_cell_0"];
        _dlItemView.bgView.backgroundColor = [UIColor colorWithHexString:@"#F7ECD3"];
        _dlItemView.titleLabel.text = @"区域代理";
        _dlItemView.clickBlock = ^{
            HNSH_AgentViewController *vc = [[HNSH_AgentViewController alloc]init];
            [[UIViewControllerHelper findCurrentShowingViewController].navigationController pushViewController:vc animated:YES];
        };
    }
    return _dlItemView;
}

- (HNSH_MineBottomItemView *)teamItemView {
    if (!_teamItemView) {
        _teamItemView = [[HNSH_MineBottomItemView alloc]initWithFrame:CGRectMake((kScreenWidth-44)/3+10+12, 277+kStatusBarHeight, (kScreenWidth-44)/3, 88)];
        _teamItemView.iconImgV.image = [UIImage imageNamed:@"mine_function_cell_1"];
        _teamItemView.bgView.backgroundColor = [UIColor colorWithHexString:@"#E4EDFB"];
        _teamItemView.titleLabel.text = @"我的团队";
        _teamItemView.clickBlock = ^{
            HNSH_MyTeamViewController *vc = [[HNSH_MyTeamViewController alloc]init];
            [[UIViewControllerHelper findCurrentShowingViewController].navigationController pushViewController:vc animated:YES];
        };
    }
    return _teamItemView;
}

- (HNSH_MineBottomItemView *)drItemView {
    if (!_drItemView) {
        _drItemView = [[HNSH_MineBottomItemView alloc]initWithFrame:CGRectMake((kScreenWidth-44)/3*2+20+12, 277+kStatusBarHeight, (kScreenWidth-44)/3, 88)];
        _drItemView.iconImgV.image = [UIImage imageNamed:@"mine_function_cell_2"];
        _drItemView.bgView.backgroundColor = [UIColor colorWithHexString:@"#FFDFF6"];
        _drItemView.titleLabel.text = @"星级达人";
        _drItemView.clickBlock = ^{
            HNSH_XJDRViewController *vc = [[HNSH_XJDRViewController alloc]init];
            [[UIViewControllerHelper findCurrentShowingViewController].navigationController pushViewController:vc animated:YES];
        };
    }
    return _drItemView;
}

@end
